# Copyright© 2021 谈翰文
#
#         This program is free software: you can redistribute it and/or modify
#         it under the terms of the GNU General Public License as published by
#         the Free Software Foundation, either version 3 of the License, or
#         (at your option) any later version.
#
#         This program is distributed in the hope that it will be useful,
#         but WITHOUT ANY WARRANTY; without even the implied warranty of
#         MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#         GNU General Public License for more details.
#
#         You should have received a copy of the GNU General Public License
#         along with this program.  If not, see <https://www.gnu.org/licenses/>.
import sqlite3

conn = sqlite3.connect('bikesys.db')
c = conn.cursor()
print("数据库打开成功")

c.execute("INSERT INTO BIKE_INCOME (ID,SALARY) \
      VALUES (1, 20000.00 )")

c.execute("INSERT INTO BIKE_INCOME (ID,SALARY) \
      VALUES (2, 15000.00 )")

c.execute("INSERT INTO BIKE_INCOME (ID,SALARY) \
      VALUES (3, 20000.00 )")

c.execute("INSERT INTO BIKE_INCOME (ID,SALARY) \
      VALUES (4, 65000.00 )")

c.execute("INSERT INTO CUSTOMER_INFO (ID,NAME,AGE,ADDRESS) \
      VALUES (1, 'Pual', 20, 'China' )")

c.execute("INSERT INTO CUSTOMER_INFO (ID,NAME,AGE,ADDRESS) \
       VALUES (2, 'Goodman', 22, 'Japan' )")

c.execute("INSERT INTO CUSTOMER_INFO (ID,NAME,AGE,ADDRESS) \
       VALUES (3, 'Johnson', 21, 'USA' )")

c.execute("INSERT INTO CUSTOMER_INFO (ID,NAME,AGE,ADDRESS) \
       VALUES (4, 'Mark', 29, 'UK' )")

c.execute("INSERT INTO BIKE_STATE (ID,STATE) \
      VALUES (1, 'good')")

c.execute("INSERT INTO BIKE_STATE (ID,STATE) \
       VALUES (2, 'bad')")

c.execute("INSERT INTO BIKE_STATE (ID,STATE) \
       VALUES (3, 'bad')")

c.execute("INSERT INTO BIKE_STATE (ID,STATE) \
       VALUES (4, 'good')")

c.execute("INSERT INTO BIKE_LOC (ID,ADDRESS) \
      VALUES (1, 'not_known')")

c.execute("INSERT INTO BIKE_LOC (ID,ADDRESS) \
       VALUES (2, 'not_known')")

c.execute("INSERT INTO BIKE_LOC (ID,ADDRESS) \
       VALUES (3, 'not_known')")

c.execute("INSERT INTO BIKE_LOC (ID,ADDRESS) \
       VALUES (4, 'not_known')")

c.execute("INSERT INTO LOC_INCOME (ADDRESS,SALARY) \
      VALUES ('San Francisco', 10000000)")

c.execute("INSERT INTO LOC_INCOME (ADDRESS,SALARY) \
       VALUES ('California', 10000000)")

c.execute("INSERT INTO LOC_INCOME (ADDRESS,SALARY) \
       VALUES ('Osaka', 50000000)")

c.execute("INSERT INTO LOC_INCOME (ADDRESS,SALARY) \
       VALUES ('Negoya', 60000000)")
conn.commit()
print("数据插入成功")
conn.close()
